home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 2 #3
/
utv2n3s2.d64
/
vision division
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-08-28
|
7KB
|
233 lines
1 clr
10 poke53280,0:poke53281,0
11 print chr$(14)
15 a1=1
20 dims(9),s$(11),se$(11),nu$(10,3)
100 gosub4000
105 gosub10000
107 gosub 6000:gosub 7000
110 gosub 490
120 h=0:v=10:tx$="[196]o you need a lesson? ([217]/[206])":gosub 600:gosub 7020:gosub 410
150 ifa$="y"ora$="[217]"thengosub20000
160 gosub2000
165 ru=1
170 gosub2100
172 ifop<>3then190
174 gosub7000:gosub490
176 gosub3000:gosub 7000
190 gosub 490:h=0:v=10
192 tx$="[196]o you want to play again? ([217]/[206])":gosub 600:gosub 7020:gosub 410
220 ifa$="y"ora$="[217]"then160
230 sys 8*4096+4
300 nn=nn+1:rw=int(rnd(0)*6)+1:forj=1to4:v=16
310 tx$=chr$(co(j))+rw$(rw)+chr$(5):gosub 690:delay=.2:gosub 940:if j=4 then330
320 tx$=" ":gosub690:delay=.05:gosub940
330 nextj:return
400 poke 198,0
402 get a$:if a$="" then 402
404 return
410 gosub 400: if a$="y" or a$="[217]" or a$="n" or a$="[206]" then print a$:return
411 if a$="[140]" then gosub7000:goto 172
412 goto 410
420 gosub 400:a=val(a$):if a>=0 and a<=9 then return
421 goto 420
430 gosub 400: if a$="[140]" then gosub 7000:goto 172
431 if a$=chr$(13) then return
432 goto 430
440 gosub 420:if a$ <lo$ or a$>hi$ then 440
441 return
480 print"[147]":rem *** print screen (NULL) ***
481 tx$="vision software presents:":h=10:v=1:gosub 600:tx$=t$
482 print"";:h=10:v=3:gosub600
483 print"";:print:gosub 800:return
490 print"[147]": rem *** print screen input# ***
491 tx$="[145][214][201][211][201][207][206][160][211][207][198][212][215][193][210][197]":h=9:v=0:gosub600
492 tx$="and [213]p[212]ime [205]agazine [208]resents:":h=9:v=1:gosub 600
497 tx$="[194]asic [196]ivision [198]acts"
498 print"";:h=9:v=3:gosub 600
499 print"";:print:gosub 800:return
600 rem *** hor/ver tab ***
610 print"";:forq=1tov
620 print"";:next
630 printtab(h);tx$;:return
690 rem *** center text ***
691 ln=len(tx$):h=int(40-ln)/2:gosub 600:return
800 rem *** line across screen ***
810 print"";:forq=1to20
820 print"[192][192]";:nextq
830 print"";:return
900 v=24:h=8:tx$=" <[210][197][212][213][210][206]> to [195]ontinue. [146]":gosub600:gosub 430:return
910 v=24:h=2:tx$=" <return> to continue, <f8> to exit [146]"
920 gosub 600:gosub 430:return
940 rem *** timer ***
941 ti$="000000"
942 ifti/60<delaythen 942
944 return
1000 rem *** math routine ***
1020 s(1)=int(rnd(1)*6)+1:s(2)=int(rnd(1)*8)+2:s(3)=s(1)*s(2):return
2000 nn=0:ifru=1then2020:rem **student info**
2010 h=0:v=10:tx$="[215]hat's your first name? [157][157][157][157]":gosub 600
2015 mx=15:gosub 5000:na$=te$
2020 v=10:h=0:tx$="[215]ould you like to: ":gosub 600:h=7:v=12
2030 fori=1to3:tx$=str$(i)+". "+op$(i):gosub 600:v=v+2:nexti:h=0
2040 tx$="[217]our choice? (1-3) ":gosub 600:lo$="1":hi$="3":gosub 440:printa$
2050 a=val(a$):op=a:hi=10:ifop=1then hi$="5":hi=5
2060 v=20:h=0:tx$="[200]ow many problems do you want ":gosub 600
2070 v=21:tx$="to do (2 -"+str$(hi)+") ":if op<>1 then gosub 600:goto 2080
2075 tx$="to do (1 - 5) ":gosub 600:gosub 440:goto 2090
2080 gosub 420:if a=1 then printa;:np=10:lo$="0":hi$="0":gosub440:printa:return
2090 np=a:return
2100 rem *** central routine ***
2110 print"[147]";chr$(142);:k=0:fori=1tonp:k=k+1:gosub7000:gosub 1000:gosub 480
2120 gosub 7020:gosub 2200:gosub 910:printchr$(142);:nexti: return
2200 rem *** see examples ***
2202 ifs(3)<10thens=s(3):goto2212
2204 v=7:h=0:tx$=str$(int(s(3)/10))
2207 forj=1to3:tx$=nu$(int(s(3)/10),j):gosub 600:v=v+1:next j
2211 s=s(3)-int(s(3)/10)*10
2212 v=7:h=3:tx$=str$(int(s(3)))
2215 forj=1to3:tx$=nu$(s,j):gosub 600:v=v+1:next j
2220 forj=1to3:v=6+j:h=11:tx$=nu$(s(2),j):gosub 600:next j
2230 v=7:h=7 :tx$=" [209] [157][157][157][192][192][192][157][157][157] [209] ":gosub 600
2231 ifop=3then17000
2232 v=20:h=0:tx$="make"+str$(s(3))+" objects in rows of"+str$(s(2))+"."
2240 gosub 600:delay=1:gosub940:g=int(rnd(1)*6)+1:co=int(rnd(1)*4)+1
2245 forj=0tos(1):v=2*j+3+(9-s(1)):tx$=str$(s(2)*j):h=17+(10-s(2))-len(tx$)
2250 :ifj=0thentx$=""
2255 gosub600:tx$="":forkk=1tos(2)
2260 ifj<>0thentx$=tx$+" "+chr$(co(co))+g$(g)+""
2270 ifj=0thentx$=tx$+str$(kk)
2275 nextkk
2280 h=17+(10-s(2)):gosub600:nextj
2300 if op<>2then delay=3:gosub 940
2310 v=20:h=0:tx$="count the rows to find the quotient.":gosub 600
2311 ifop=2then2350
2312 forj=1tos(1):v=2*j+3+(9-s(1))
2320 h=15+(10-s(2))+(s(2)+1)*2
2325 tx$="[159]"+str$(j)+""
2330 gosub600:delay=.5:gosub940:nextj
2350 v=14:h=7:tx$=str$(s(1)):if rev=1 then return
2360 ifop=2thengosub15000
2370 forj=1to3:tx$=nu$(s(1),j):gosub 600:v=v+1:nextj:return
3000 print chr$(14):pct=(nn/k)*100:pct=pct+.5:pct=int(pct)
3010 v=7:h=0:tx$="[217]ou got"+str$(nn)+" right out of"+str$(k)+" problems":gosub600
3020 v=8:tx$="for"+str$(pct)+"%.":gosub 600
3090 gosub 7020:gosub 900:return
4000 rem *** read data ***
4005 readt$
4010 fori=1to6:read rw$(i):next i
4040 fori=1to3:read op$(i):next i
4070 fori=1to4:read co(i):next i
4091 fori=0to9:for j=1 to 3:read nu$(i,j):next j:next i
4096 fori=1to6:read g$(i):next i:return
4100 rem *** program data ***
4110 data"basic division facts"
4120 data"great!","fantastic!","super!"
4130 data"you're really going now!","yes! yes! yes!","that's great!"
4140 data"[211]ee [197]xamples [196]one."
4150 data"[196]o [208]roblems with [200]elp."
4160 data"[196]o [208]roblems [217]ourself."
4170 data28,30,31,158
4180 data"[213][192][201]","[221] [221]","[202][192][203]"
4190 data" [174] "," [221] "," [177] "
4200 data"[213][192][201]","[213][192][203]","[173][192][195]"
4210 data"[213][192][201]"," [192][179]","[202][192][203]"
4220 data"[213] [174]","[173][192][219]"," [177]"
4230 data"[176][192][201]","[173][192][201]","[202][192][203]"
4240 data"[213][192][201]","[171][192][201]","[202][192][203]"
4250 data"[176][192][174]"," [213][203]"," [177] "
4260 data"[213][192][201]","[171][192][179]","[202][192][203]"
4270 data"[213][192][201]","[202][192][179]","[202][192][203]"
4280 data"[215]","[209]","[211]","[193]","[218]"," [146]"
5000 te$="":print"[164]";
5010 get a$:if a$="" then 5010
5020 if a$=chr$(13) then printchr$(20):return
5030 if a$=chr$(20) and te$="" then 5010
5035 if a$=chr$(20) then printa$a$"[164]";:te$=left$(te$,len(te$)-1):goto 5010
5036 if a$="[140]" then gosub 7000:goto 172
5037 if len(te$)=mx then 5010
5040 if a$<" " or a$>"[218]" then 5010
5050 if a$>"z" and a$<"[193]" then 5010
5060 printchr$(20)a$"[164]";
5070 te$=te$+a$
5080 goto 5010
6000 gosub 7000:gosub 490:print
6010 print tab(7)"[158][161][146][161][161][146][161] [187][172][146] [172][172][187][146][187] [187][172][146] [172][172][187][146][187] [161][188][161][146][161]"
6020 print tab(7)"[161][146][161][161][146][161] [161][146][161] [188][188][146][162] [161][146][161] [161][146][161][161][146][161] [161] [146][161]"
6030 print tab(7)"[188][188][190][146][190] [161][146][161] [172][187][161][146][161] [161][146][161] [161][146][161][161][146][161] [161][146][161][187][146][161]"
6040 print tab(7)" [188][190] [162][162][146] [162][162][146] [162][162][146] [162][162][146] [188][190][188][190]"
6050 printtab(3)"[161][172][188][146] [187][172][146] [161][146][161][161][146][161] [187][172][146] [172][172][187][146][187] [187][172][146] [172][172][187][146][187] [161][188][161][146][161]"
6060 printtab(3)"[161][146][161][161][146][161] [161][146][161] [161][146][161][161][146][161] [161][146][161] [188][188][146][162] [161][146][161] [161][146][161][161][146][161] [161] [146][161]"
6070 printtab(3)"[161][146][161][190][146][190] [161][146][161] [188][188][190][146][190] [161][146][161] [172][187][161][146][161] [161][146][161] [161][146][161][161][146][161] [161][146][161][187][146][161]"
6080 printtab(3)"[188][162][146][190] [162][162][146] [188][190] [162][162][146] [162][162][146] [162][162][146] [162][162][146] [188][190][188][190]"
6090 printtab(8)"[159][208]ress [210][197][212][213][210][206][159] to [195]ontinue"
6100 print"[152] [208]ublished by [211]oftdisk [208]ublishing, [201]nc."
6110 poke53269,1:poke 198,0:gosub 7020
6120 get a$:if a$<>chr$(13) then 6120
6130 return
7000 poke 53265,11
7010 return
7020 poke 53265,27
7030 return
10000 rem *** do spritey th